package com.scnlf.scnlf.portal.core.business.event.entity;

import com.scnlf.scnlf.portal.core.business.common.enums.EventTypeEnum;
import com.scnlf.scnlf.portal.core.business.common.enums.FlowTypeEnum;
import com.scnlf.scnlf.portal.core.business.common.enums.SideEnum;
import com.scnlf.scnlf.portal.core.business.common.enums.TargetStatusEnum;
import com.scnlf.scnlf.portal.core.common.entity.AuditingEntity;
import java.time.LocalDate;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;
import lombok.Data;
import lombok.experimental.Accessors;

@Entity
@Table(name = "event")
@Data
@Accessors(chain = true)
public class EventEntity extends AuditingEntity {

  /**
   * 交易日
   */
  private LocalDate tradingDay;

  /**
   * 事件源ID
   */
  private Long sourceEventId;

  /**
   * 事件类型
   */
  @Enumerated(EnumType.STRING)
  private EventTypeEnum eventType;

  /**
   * 流程状态
   */
  @Enumerated(EnumType.STRING)
  private FlowTypeEnum flowStatus;

  /**
   * 目标状态
   */
  @Enumerated(EnumType.STRING)
  private TargetStatusEnum targetStatus;

  /**
   * 客户名称
   */
  private String customerNo;

  /**
   * 证券代码
   */
  private String symbol;

  /**
   * 买卖方向
   */
  @Enumerated(EnumType.STRING)
  private SideEnum side;

  /**
   * 事件数量
   */
  private Long quantity;

  /**
   * 备注
   */
  private String memo;

  /**
   * 券单ID
   */
  private Long loanTicketId;

}
